package testapp.client.util;

import com.google.gwt.core.client.GWT;
import com.googlecode.gwtphonegap.client.PhoneGap;

public class AppContext {
    private static AppContext instance = new AppContext();

    private final PhoneGap phoneGap = GWT.create(PhoneGap.class);

    private int activePanel;

    public static AppContext getInstance() {
        return instance;
    }

    public native void showKeyBoard()/*-{
        $wnd.KeyBoard.showKeyBoard();
    }-*/;

    public native void hideKeyBoard()/*-{
        $wnd.KeyBoard.hideKeyBoard();
    }-*/;

    public PhoneGap getPhoneGap() {
        return phoneGap;
    }

    public int getActivePanel() {
        return activePanel;
    }

    public void setActivePanel(int activePanel) {
        this.activePanel = activePanel;
    }
}
